/**
 *
 */
package com.zhuoyue.elmt.service;

import com.eit.eitsite.common.persistence.Page;
import com.eit.eitsite.common.service.CrudService;
import com.zhuoyue.elmt.dao.DeviceParametersDao;
import com.zhuoyue.elmt.dao.StatisticsDao;
import com.zhuoyue.elmt.entity.DeviceParameters;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.List;

/**
 * 电梯统计Service
 */
@Service
@Transactional(readOnly = true)
public class StatisticsService extends CrudService<StatisticsDao, DeviceParameters> {

    // 逾期、当天、本周
    public List<HashMap> statDeviceCountByType(HashMap param) {
        return dao.statDeviceCountByType(param);
    }

    // 逾期、当天、本周 列表
    @Transactional(readOnly = false)
    public List<HashMap> statDeviceByType(HashMap param) {
        return dao.statDeviceByType(param);
    }

    // 排行榜
    public List<HashMap> statrank(HashMap param) {
        return dao.statrank(param);
    }

    // 排行榜
    public List<DeviceParameters> statYearRemind(HashMap param) {
        return dao.statYearRemind(param);
    }
}